/* 全局变量 */
:root {
    --pet-primary: #4CAF50;
    --pet-secondary: #2196F3;
    --pet-light: #E8F5E9;
    --pet-dark: #1B5E20;
    --pet-gray: #757575;
}

/* 全局样式 */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #333;
}

/* 页面标题样式 */
.page-header {
    background-color: var(--pet-light);
    padding: 3rem 0;
    margin-bottom: 2rem;
    text-align: center;
}

.page-header h1 {
    color: var(--pet-dark);
    font-weight: bold;
    margin-bottom: 1rem;
}

.page-header .lead {
    color: var(--pet-gray);
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
}

/* 筛选区域样式 */
.filter-section {
    background-color: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.form-select {
    border-radius: 20px;
    padding: 0.5rem 1.2rem;
    border-color: #e0e0e0;
}

.form-select:focus {
    border-color: var(--pet-primary);
    box-shadow: 0 0 0 0.2rem rgba(76, 175, 80, 0.25);
}

/* 导航栏样式 */
.navbar {
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
}

.navbar-brand {
    color: var(--pet-primary) !important;
    font-weight: bold;
    font-size: 1.5rem;
}

.navbar-brand i {
    color: var(--pet-primary);
}

.nav-link {
    color: var(--pet-dark) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--pet-primary) !important;
    transform: translateY(-2px);
}

.nav-link.active {
    color: var(--pet-primary) !important;
    font-weight: 600;
}

/* 搜索框样式 */
.form-control {
    border-radius: 20px;
    padding: 0.5rem 1.2rem;
}

.form-control:focus {
    border-color: var(--pet-primary);
    box-shadow: 0 0 0 0.2rem rgba(76, 175, 80, 0.25);
}

.btn-outline-primary {
    color: var(--pet-primary);
    border-color: var(--pet-primary);
    border-radius: 20px;
    padding: 0.5rem 1.5rem;
}

.btn-outline-primary:hover {
    background-color: var(--pet-primary);
    border-color: var(--pet-primary);
    color: white;
}

/* 轮播图样式 */
.carousel {
    margin-bottom: 2rem;
}

.carousel-item {
    height: 400px;
    background-position: center;
    background-size: cover;
}

.carousel-item img {
    object-fit: cover;
    height: 100%;
    filter: brightness(0.8);
}

.carousel-caption {
    background: rgba(0, 0, 0, 0.5);
    padding: 20px;
    border-radius: 10px;
}

.carousel-caption h2 {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.carousel-indicators button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin: 0 5px;
}

.carousel-indicators .active {
    background-color: var(--pet-primary);
}

/* 特色卡片样式 */
.feature-card {
    background-color: white;
    border-radius: 15px;
    transition: transform 0.3s, box-shadow 0.3s;
    border: none;
    overflow: hidden;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.feature-card .card-body {
    padding: 2rem 1rem;
}

.feature-card i {
    font-size: 2.5rem;
    color: var(--pet-primary);
    margin-bottom: 1.5rem;
}

.feature-card .card-title {
    color: var(--pet-dark);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.feature-card .card-text {
    color: var(--pet-gray);
    font-size: 0.9rem;
}

/* 宠物卡片样式 */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h3 {
    color: var(--pet-dark);
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.section-header p {
    color: var(--pet-gray);
}

.pet-card {
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    border: none;
    position: relative;
}

.pet-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.pet-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--pet-primary);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
}

.pet-card img {
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s;
}

.pet-card:hover img {
    transform: scale(1.05);
}

.pet-card .card-body {
    padding: 1.5rem;
}

.pet-card .card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--pet-dark);
}

.pet-card .card-text {
    color: var(--pet-gray);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.location {
    color: var(--pet-gray);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.location i {
    color: var(--pet-primary);
    margin-right: 0.3rem;
}

.price {
    color: var(--pet-primary);
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.btn-primary {
    background-color: var(--pet-primary);
    border-color: var(--pet-primary);
    border-radius: 20px;
    padding: 0.5rem 0;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--pet-dark);
    border-color: var(--pet-dark);
    transform: translateY(-2px);
}

/* 分页样式 */
.pagination {
    margin-top: 2rem;
}

.page-link {
    color: var(--pet-primary);
    border-radius: 20px;
    margin: 0 0.2rem;
    padding: 0.5rem 1rem;
}

.page-item.active .page-link {
    background-color: var(--pet-primary);
    border-color: var(--pet-primary);
}

.page-link:hover {
    color: var(--pet-dark);
    background-color: var(--pet-light);
    border-color: var(--pet-light);
}

/* 模态框样式 */
.modal-content {
    border-radius: 15px;
    border: none;
}

.modal-header {
    border-bottom: none;
    padding: 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: none;
    padding: 1.5rem;
}

/* 页脚样式 */
footer {
    background-color: var(--pet-light);
    color: var(--pet-dark);
}

footer h5 {
    color: var(--pet-dark);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

footer a {
    text-decoration: none;
    color: var(--pet-gray);
    font-size: 0.9rem;
    display: block;
    margin-bottom: 0.8rem;
    transition: all 0.3s ease;
}

footer a:hover {
    color: var(--pet-primary);
    transform: translateX(5px);
}

footer i {
    color: var(--pet-primary);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .carousel-item {
        height: 300px;
    }

    .carousel-caption h2 {
        font-size: 1.8rem;
    }

    .feature-card .card-body {
        padding: 1.5rem 1rem;
    }

    .pet-card img {
        height: 150px;
    }

    .pet-card .card-title {
        font-size: 1rem;
    }

    .pet-card .card-text {
        font-size: 0.8rem;
    }

    .page-header {
        padding: 2rem 0;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .page-header .lead {
        font-size: 1rem;
    }

    footer h5 {
        margin-top: 1.5rem;
    }

    .filter-section {
        padding: 1rem;
    }
}

/* 登录注册页面样式 */
.nav-pills .nav-link {
    border-radius: 20px;
    padding: 0.5rem 2rem;
}

.nav-pills .nav-link.active {
    background-color: var(--pet-primary);
}

.social-login .btn {
    border-radius: 20px;
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.feature-card,
.pet-card {
    animation: fadeIn 0.5s ease-out;
}